import request from '@/utils/request'
//查询房源列表(无参数)
export function housingResourcesList(parkId,buildingId) {
  return request({
    url: '/housingManage/room/housingResourcesList',
    method: 'get',
    params:{parkId,buildingId}
  })
}

//查询房源列表(有参数)
export function queryBuilding(query) {
  return request({
    url: '/housingManage/room/housingResourcesList',
    method: 'get',
    params: query
  })
}
export function queryBuildingItem(parkId) {
  return request({
    url: '/housingManage/building/selectByParkId',
    method: 'get',
    params:{parkId:parkId}
  })
}

//预约/取消预约（有无remarks）
export function subscribe(data) {
  return request({
    url: '/housingManage/room/reservation',
    method: 'put',
    data:data
  })
}

//通过蓝色的卡片查看详情
export function queryBuleDetail(id) {
  return request({
    url: '/housingManage/room/roomInfo',
    method: 'get',
    params:{id:id}
  })
}


//床位总数
export function totalBed(query) {
  return request({
    url: '/system/room/allrooms',
    method: 'get',
    params: query
  })
}

//空余房间数
export function spareRoom(query) {
  return request({
    url: '/system/room/available',
    method: 'get',
    params: query
  })
}
//空余床位数
export function spareBed(query) {
  return request({
    url: '/system/room/checkInAll',
    method: 'get',
    params: query
  })
}

//预约床位数
export function orderBed(query) {
  return request({
    url: '/system/room/checkOutAll',
    method: 'get',
    params: query
  })
}
// export function roomFloor(query) {
//   return request({
//     url: `/system/room/roomFloor/${roomFloor}`,
//     method: 'get',
//   });
// }
// export function roomFloor(query) {
//   return request({
//     url: '/system/room/roomFloor/{roomFloor}',
//     method: 'get',
//   })
// }

export function roomFloor(roomFloor) {
  return request({
    url: '/system/room/roomFloor/' + roomFloor,
    method: 'get'
  });
}
// export function currentFloor(roomFloor) {
//   return request({
//     url: `/system/room/roomFloor/${roomFloor}`,
//     method: 'get'
//   });
// }




